<?php 
	// load hybridauth base file, change the following paths if necessary 
	// note: in your application you probably have to include these only when required.
	//echo dirname(__FILE__);
	//$hybridauth_config = dirname(__FILE__) . '../config.php';
	$hybridauth_config = array( 
      "base_url" => "http://www.maxcash.com.au/hauth/",  
      "providers" => array (
        "Facebook" => array ( 
          "enabled" => true,
          "keys"    => array ( "id" => "633890109972985", "secret" => "a6a69b8494a19f50fcbb524ab8564755" ),
          //"scope"   => "email, user_about_me, user_birthday, user_hometown", // optional
          "display" => "popup" // optional
    )));
	/*
	$hybridauth_config = array(
		"base_url" => "http://www.maxcash.com.au/hauth/", 

		"providers" => array ( 
			// openid providers
			"OpenID" => array (
				"enabled" => false
			),

			"AOL"  => array ( 
				"enabled" => false 
			),

			"Yahoo" => array ( 
				"enabled" => false,
				"keys"    => array ( "id" => "", "secret" => "" )
			),

			"Google" => array ( 
				"enabled" => false,
				"keys"    => array ( "id" => "", "secret" => "" )
			),

			"Facebook" => array ( 
				"enabled" => true,
				"keys"    => array ( "id" => "633890109972985", "secret" => "a6a69b8494a19f50fcbb524ab8564755" ),
				"display" => "popup"
			),

			"Twitter" => array ( 
				"enabled" => false,
				"keys"    => array ( "key" => "", "secret" => "" ) 
			),

			// windows live
			"Live" => array ( 
				"enabled" => false,
				"keys"    => array ( "id" => "", "secret" => "" ) 
			),

			"MySpace" => array ( 
				"enabled" => false,
				"keys"    => array ( "key" => "", "secret" => "" ) 
			),

			"LinkedIn" => array ( 
				"enabled" => false,
				"keys"    => array ( "key" => "", "secret" => "" ) 
			),

			"Foursquare" => array (
				"enabled" => false,
				"keys"    => array ( "id" => "", "secret" => "" ) 
			),
		),

		// if you want to enable logging, set 'debug_mode' to true  then provide a writable file by the web server on "debug_file"
		"debug_mode" => false,

		"debug_file" => ""
	); */
	
	require_once( "../Hybrid/Auth.php" );

	// database config
	/*$database_host = "localhost"; 
	$database_user = "root";
	$database_pass = "";
	$database_name = "hybridauth_test";*/
	
	
	$database_host = "localhost"; 
	$database_user = "root";
	$database_pass = "";
	$database_name = "max_livehelp";
	

	$database_link = @ mysql_connect( $database_host, $database_user, $database_pass );

	if ( ! $database_link ) {
		die( "This sample requires a Mysql database. Please edit the configuration file: <b>application.config.php</b>. <hr><b>Mysql error</b>: " . mysql_error() );
	}

	$db_selected = mysql_select_db( $database_name, $database_link );

	if ( ! $db_selected ) {
		die( "This sample requires a Mysql database. Please edit the configuration file: <b>application.config.php</b>. <hr><b>Mysql error</b>: " . mysql_error() );
	}

	function mysql_query_excute( $sql ){ 
		$result = mysql_query($sql);
 
		if (!$result) {
			$message  = 'Invalid query: ' . mysql_error() . "\n";
			$message .= 'Whole query: ' . $sql;
			die($message);
		}

		return $result;
	}
?>